<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
    <div class="aside">
        
        <div class="mod">
        	<div class="body">
            	
                <div class="well">
                    <h3>联系方式</h3>
                    公司名称：{$c['companyname']}<br/>
                    联系人：{$c['linkman']}<br/>
                    联系电话：{magic_image($c['telephone'])}<br/>
                    电子邮箱：{magic_image($c['email'])}<br/>
                    公司类型：{$c['genre']}<br/>
                    地　址：{$c['address']}<br/>          
                    公司网站：<a href="{url("?module=yellowpage&userid=$c[userid]")}">{url("?module=yellowpage&userid=$c[userid]")}</a><br/>
                    <a class="button" href="{url("?module=yellowpage&userid=$c[userid]")}">查看公司详情</a>
                    <a class="button" href="?module={$module}&file=collect&userid={$rs[userid]}&title={$rs[title]}&callback_js=callback_js&referer={urlencode(URL)}">收藏此信息</a>
                    <br/>
                    <img src="{$c['logo']}" alt="公司标志" width="240"/>
                </div>
        
            </div>
        </div>
        
        
        <div class="mod">
        	<div class="head">产品库大类列表</div>
            <div class="body">
            	<ul>
                {get sql="SELECT catname,catid FROM `table_category` WHERE module = 'yp' AND parentid = '0' ORDER BY listorder ASC"}
                <li><a href="{url('product',$r['catid'])}">{$r['catname']}</a></li>
                {/get}
              </ul>
            </div>
        </div>
        
        <div class="mod">
        	<div class="head">浏览过的产品</div>
            <div class="body">
            	<ul>
                  {if $prowhere}
                  {get sql="SELECT id,title,thumb,url FROM `table_yellowpage_product` WHERE id IN ($prowhere) AND status = '99' ORDER BY FIND_IN_SET(id,'$prowhere')" rows="10"}
                  <li><a href="{url($r[url])}"><img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/></a><a href="{url($r[url])}" title="{$r['title']}">{$r['title']}</a></li>
                  {/get}
                  {else}
                  <li>您还没有浏览过任何商品</li>
                  {/if}
                  </ul>
            </div>
        </div>
        
        <div class="mod">
        	<div class="head">最新产品</div>
            <div class="body">
            	 <ul>
                {get sql="SELECT p.id,p.title,p.thumb,c.companyname,p.userid,p.url FROM `table_yellowpage_product` `p`,`table_member_company` `c` WHERE c.userid = p.userid AND p.status = '99' ORDER BY id DESC" rows="10"}
                    <li>
                        <img src="{thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif')}" alt="" width="48" height="48"/>
                        <a href="{url($r[url])}" title="{$r['title']}"><strong>{str_cut($r['title'],20,'')}</strong></a>
                        <span><a href="{url($r['userid'])}" title="{$r['companyname']}">{str_cut($r['companyname'],20,'')}</a></span>
                    </li>
                {/get}
              </ul>
            </div>
        </div>
        
    </div>
    <div class="main">
    
    
        <ul class="breadcrumb">
          <li><a href="#">首页</a> <span class="divider">/</span></li>
          <li><a href="#">企业黄页</a> <span class="divider">/</span></li>
          <li><a href="#">产品</a> <span class="divider">/</span></li>
          <li class="active">产品信息</li>
        </ul>
        
        
        <div class="mod">
            <div class="body row">
            	
                <div class="span6">
                	{$rs['title']}
         
                      <p>单　价：{if $rs['price']}￥{$rs[price]}元/{$rs[quantifier]}{else}<a href="{url($c['userid'],$c[sitedomain])}/category-guestbook/label-product/id-{$rs['id']}.html">我要询价</a>{/if}</p>
                      {if $rs[standard]}<p>产品型号：{$rs[standard]}</p>{/if}
                      <p>浏览量：{$rs['hits']}次</p>
                      <p>联系人：{$c['linkman']}</p>
                      <p>发布时间：{date("Y-m-d H:i:s",$rs['inputtime'])}</p>
                      <p>更新时间：{date("Y-m-d H:i:s",$rs['updatetime'])}</p>
              
                    
                    
                    {if $rs[userid] == $_userid || $_userid == 1}
                        <a href="{url("?module=$module&file=$file&action=edit&id=$id")}" class="button"><i class="icon-edit"></i>修改</a>
                        <a href="javascript:if(confirm('确定要删除吗？')) location='?module={$module}&file={$file}&action=delete&id={$id}'" class="button button-danger"><i class="icon-remove icon-white"></i>删除</a>
                    {/if} 
                
                    <br/>
                    
                
                    <br/>
                    产品介绍{$rs['content']}
                </div>
                
                <div class="span2">
                	<a onerror = "this.src='{$rs['thumb']}'"   title="点此查看大图"  target="_blank"  href="{$rs['thumb']}"><img alt="{$rs['title']}" src="{php echo $rs[thumb] ? thumb($rs['thumb'],180,200) : 'misc/nopic.gif'}"/></a>
                </div>
                
                  
           </div>
         </div>   
        
    
	</div>
</div>
{template 'footer.html'}
